package io.renren.modules.mapp.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.mapp.dao.ActivityDao;
import io.renren.modules.mapp.entity.ActivityEntity;
import io.renren.modules.mapp.service.ActivityService;



@Service("activityService")
public class ActivityServiceImpl implements ActivityService {
	@Autowired
	private ActivityDao activityDao;
	
	@Override
	public ActivityEntity queryObject(Long id){
		return activityDao.queryObject(id);
	}
	
	@Override
	public List<ActivityEntity> queryList(Map<String, Object> map){
		return activityDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return activityDao.queryTotal(map);
	}
	
	@Override
	public void save(ActivityEntity activity){
		activityDao.save(activity);
	}
	
	@Override
	public void update(ActivityEntity activity){
		activityDao.update(activity);
	}
	
	@Override
	public void delete(Long id){
		activityDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		activityDao.deleteBatch(ids);
	}

	@Override
	public List<ActivityEntity> queryMyActivities(String openId) {
		return this.activityDao.queryMyActivities(openId);
	}

	@Override
	public List<ActivityEntity> queryActivitiesJoined(String openId) {
		return this.activityDao.queryActivitiesJoined(openId);
	}

}
